package cardemo;

import dagger.Module;
import dagger.Provides;

@Module
public class CarModule {
    @Provides
    public Engine provideEngine(){
        return new Engine();
    }
 
    //@Provides
    //一个类只能提供一个构造器作为依赖
    public Seat provideSeat(){
        return new Seat();
    }
    
    //@Provides
    //一个类只能提供一个构造器作为依赖
    public Seat provideSeat2(){
         return new Seat("有车套");
     }
    
    @Provides
    public Seat provideSeat(Leather leather){
        return new Seat(leather);
    }
    
    @Provides
    public Leather provideLeather(){
        return new Leather();
    }
 
    @Provides
    public Wheel provideWheel(){
        return new Wheel();
    }
}
